//
//  RightPageBtn.m
//  警用舆情平台
//
//  Created by 魏强 on 15/5/15.
//  Copyright (c) 2015年 魏强. All rights reserved.
//

#import "RightPageBtn.h"

@implementation RightPageBtn

- (void)awakeFromNib{
    [super awakeFromNib];
    self.backgroundColor = [UIColor whiteColor];
    self.layer.cornerRadius = 15;
    self.clipsToBounds = YES;
    self.layer.borderWidth = 1;
    self.layer.borderColor = [UIColor whiteColor].CGColor;

}

- (void)drawRect:(CGRect)rect {
    [super drawRect:rect];
    
    [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    //    [self setTintAdjustmentMode:UIViewTintAdjustmentModeNormal];
    if (iOS7) {
        self.titleLabel.font = [UIFont systemFontOfSize:14];
    }else{
        self.titleLabel.font = [UIFont systemFontOfSize:14 weight:0.3];
    }
    
    [self setTitleColor:WQColor(105, 219, 191) forState:UIControlStateSelected];
}

- (void)setSelected:(BOOL)selected
{
    [super setSelected:selected];
    if (selected) {
        self.layer.borderColor = WQColor(105, 219, 191).CGColor;
    }else{
        self.layer.borderColor = [UIColor whiteColor].CGColor;
    }
    [self setNeedsDisplay];
}

@end
